﻿using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.订单一览新.销售确认单
{
    public partial class XtraUserControl季度销售统计 : DevExpress.XtraEditors.XtraUserControl
    {
        public XtraUserControl季度销售统计()
        {
            InitializeComponent();
        }
        public XtraUserControl季度销售统计(List<SaleScaleDTO> saleScaleDTOs)
        {
            InitializeComponent();
            this.gridControl本月销量.DataSource = saleScaleDTOs;
            this.gridView本月销量.ExpandAllGroups();
            this.gridView本月销量.BestFitColumns();
            this.gridView本月销量.RefreshData();
            this.gridView本月销量.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "quantity", gridColumn数量, "组计:{0}");
        }

        private void gridView本月销量_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
        {
            try
            {
                if (e.Column.Name.Equals("gridColumn尺码"))
                {
                    if (!String.IsNullOrWhiteSpace(e.DisplayText))
                    {
                        try { e.DisplayText = e.DisplayText.Replace("IGS_GROUP_SIZE-", "").Replace("EGS_GROUP_SIZE-", ""); } catch { }
                    }
                }
            }
            catch { }
        }
    }
}
